package com.easyweb.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.easyweb.dao.FriendLinkDao;
import com.easyweb.model.FriendLink;
import com.easyweb.service.FriendLinkService;

@Service
public class FriendLinkServiceImpl implements FriendLinkService{

	@Autowired
	private FriendLinkDao friendLinkDao;
	
	public int insertFriendLink(FriendLink friendLink) {
		return friendLinkDao.insertFriendLink(friendLink);
	}

	public int updateFriendLink(FriendLink friendLink) {
		return friendLinkDao.updateFriendLink(friendLink);
	}

	public int deleteFriendLink(Map<String, Object> map) {
		return friendLinkDao.deleteFriendLink(map);
	}

	public List<FriendLink> getFriendLinks(Map<String, Object> map) {
		return friendLinkDao.getFriendLinks(map);
	}

	public FriendLink getFriendLinkById(String id) {
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("id", id);
		return friendLinkDao.getFriendLinkById(map);
	}

}
